<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\fcs\vpos\service\guide;

class TaskPerformanceListReq {
	
	static $_TSPEC;
	public $curPageNo = null;
	public $pageSize = null;
	public $companyCode = null;
	public $userId = null;
	public $xstoreId = null;
	public $dateDimension = null;
	public $cursor = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			500 => array(
			'var' => 'curPageNo'
			),
			501 => array(
			'var' => 'pageSize'
			),
			1 => array(
			'var' => 'companyCode'
			),
			2 => array(
			'var' => 'userId'
			),
			3 => array(
			'var' => 'xstoreId'
			),
			4 => array(
			'var' => 'dateDimension'
			),
			5 => array(
			'var' => 'cursor'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['curPageNo'])){
				
				$this->curPageNo = $vals['curPageNo'];
			}
			
			
			if (isset($vals['pageSize'])){
				
				$this->pageSize = $vals['pageSize'];
			}
			
			
			if (isset($vals['companyCode'])){
				
				$this->companyCode = $vals['companyCode'];
			}
			
			
			if (isset($vals['userId'])){
				
				$this->userId = $vals['userId'];
			}
			
			
			if (isset($vals['xstoreId'])){
				
				$this->xstoreId = $vals['xstoreId'];
			}
			
			
			if (isset($vals['dateDimension'])){
				
				$this->dateDimension = $vals['dateDimension'];
			}
			
			
			if (isset($vals['cursor'])){
				
				$this->cursor = $vals['cursor'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'TaskPerformanceListReq';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("curPageNo" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->curPageNo); 
				
			}
			
			
			
			
			if ("pageSize" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->pageSize); 
				
			}
			
			
			
			
			if ("companyCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->companyCode);
				
			}
			
			
			
			
			if ("userId" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->userId); 
				
			}
			
			
			
			
			if ("xstoreId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->xstoreId);
				
			}
			
			
			
			
			if ("dateDimension" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->dateDimension);
				
			}
			
			
			
			
			if ("cursor" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->cursor); 
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		$xfer += $output->writeFieldBegin('curPageNo');
		$xfer += $output->writeI32($this->curPageNo);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('pageSize');
		$xfer += $output->writeI32($this->pageSize);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('companyCode');
		$xfer += $output->writeString($this->companyCode);
		
		$xfer += $output->writeFieldEnd();
		
		if($this->userId !== null) {
			
			$xfer += $output->writeFieldBegin('userId');
			$xfer += $output->writeI64($this->userId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldBegin('xstoreId');
		$xfer += $output->writeString($this->xstoreId);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('dateDimension');
		$xfer += $output->writeString($this->dateDimension);
		
		$xfer += $output->writeFieldEnd();
		
		if($this->cursor !== null) {
			
			$xfer += $output->writeFieldBegin('cursor');
			$xfer += $output->writeI64($this->cursor);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>